package pnu.ssm.controller.manager;

import pnu.ssm.model.stuff.Stuff;
import pnu.ssm.model.tile.Tile;

// Singleton Pattern
public class TileManager {
	private Tile[][] map;
	public static int tileSize;
	
	private static TileManager instance = new TileManager();
	private TileManager(){};
	public static TileManager getInstance(){
		return instance;
	}
	
	public void init(){
		tileSize = 0;
		map = null;
	}
	
	public Tile[][] getMap(){
		return map;
	}
	
	public void setMap(int tileSize, Tile[][] map){
		this.tileSize = tileSize;
		this.map = map;
	}
	
	public void setStuffToTile(int x, int y, Stuff s){
		map[y][x].setStuff(s);
	}
	
	public int getMapRow(){
		return map.length;
	}
	
	public int getMapCol(){
		return map[0].length;
	}
	
	public int getTileSize(){
		return tileSize;
	}
}
